<?php

class Form_Login extends Zend_Form
{

    public $buttonDecorators = array(
        'ViewHelper',
        array(array('data' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'block')));

    public function init()
    {
        $this->setMethod(self::METHOD_POST);

        /* this Elements & Other Definitions Here ... */
        $email = $this->createElement('text', 'email');
        $email->addValidator('EmailAddress');
        $email->setRequired(true);
        $email->addFilter('StringToLower');
        $email->setLabel('E-mail');
        $this->addElement($email);

        $password = $this->createElement('password', 'password');
        $password->setRequired(true);
        $password->setLabel('Password');
        $this->addElement($password);

        $login = $this->createElement("hidden", "login");
        $login->setValue(1);
        $this->addElement($login);

        $button = $this->createElement('button', 'DB_Login_button', array("label" => "Login", "type" => "submit", "class" => "thoughtbot", "decorators" => $this->buttonDecorators));
        $this->addElement($button);
    }

}

